<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    // reverse 反转
    let arr= [1,9,15,3,6,10]
    arr.reverse();
    console.log(arr)

    // sort 排序,默认按照字符串排序,
    console.log(arr.sort()) // [1,10,15,3,6,9]
    console.log(arr.sort((a,b) =>a-b)) //[1,3,6,9,10,15]

</script>
</body>
</html>